Optimal. Leaf size=119 \[ \frac {a \left (a^2+3 b^2\right ) \text {ArcTan}(\sinh (c+d x))}{2 \left (a^2+b^2\right )^2 d}-\frac {b^3 \log (\cosh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2747, 755, 815,
649, 209, 266} \begin {gather*} \frac {a \left (a^2+3 b^2\right ) \text {ArcTan}(\sinh (c+d x))}{2 d \left (a^2+b^2\right )^2}+\frac {\text {sech}^2(c+d x) (a \sinh (c+d x)+b)}{2 d \left (a^2+b^2\right )}+\frac {b^3 \log (a+b \sinh (c+d x))}{d \left (a^2+b^2\right )^2}-\frac {b^3 \log (\cosh (c+d x))}{d \left (a^2+b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 755
Rule 815
Rule 2747
Rubi steps
\begin {align*} \int \frac {\text {sech}^3(c+d x)}{a+b \sinh (c+d x)} \, dx &=\frac {b^3 \text {Subst}\left (\int \frac {1}{(a+x) \left (-b^2-x^2\right )^2} \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {b \text {Subst}\left (\int \frac {a^2+2 b^2+a x}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right ) d}\\ &=\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {b \text {Subst}\left (\int \left (-\frac {2 b^2}{\left (a^2+b^2\right ) (a+x)}+\frac {-a^3-3 a b^2+2 b^2 x}{\left (a^2+b^2\right ) \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right ) d}\\ &=\frac {b^3 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {b \text {Subst}\left (\int \frac {-a^3-3 a b^2+2 b^2 x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right )^2 d}\\ &=\frac {b^3 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {b^3 \text {Subst}\left (\int \frac {x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right )^2 d}+\frac {\left (a b \left (a^2+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right )^2 d}\\ &=\frac {a \left (a^2+3 b^2\right ) \tan ^{-1}(\sinh (c+d x))}{2 \left (a^2+b^2\right )^2 d}-\frac {b^3 \log (\cosh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 104, normalized size = 0.87 \begin {gather*} \frac {2 a \left (a^2+3 b^2\right ) \text {ArcTan}\left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )+2 b^3 (-\log (\cosh (c+d x))+\log (a+b \sinh (c+d x)))+b \left (a^2+b^2\right ) \text {sech}^2(c+d x)+a \left (a^2+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{2 \left (a^2+b^2\right )^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.42, size = 205, normalized size = 1.72
method | result | size |
derivativedivides | \(\frac {\frac {b^{3} \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {\frac {2 \left (\left (-\frac {1}{2} a^{3}-\frac {1}{2} a \,b^{2}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-a^{2} b -b^{3}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {1}{2} a^{3}+\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-b^{3} \ln \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (a^{3}+3 a \,b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}}{d}\) | \(205\) |
default | \(\frac {\frac {b^{3} \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {\frac {2 \left (\left (-\frac {1}{2} a^{3}-\frac {1}{2} a \,b^{2}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-a^{2} b -b^{3}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {1}{2} a^{3}+\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-b^{3} \ln \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (a^{3}+3 a \,b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}}{d}\) | \(205\) |
risch | \(\frac {2 b^{3} d^{2} x}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}+\frac {2 b^{3} d c}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}-\frac {2 b^{3} x}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 b^{3} c}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {{\mathrm e}^{d x +c} \left (a \,{\mathrm e}^{2 d x +2 c}+2 b \,{\mathrm e}^{d x +c}-a \right )}{d \left (a^{2}+b^{2}\right ) \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{3}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {3 i \ln \left ({\mathrm e}^{d x +c}+i\right ) a \,b^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {\ln \left ({\mathrm e}^{d x +c}+i\right ) b^{3}}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{3}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {3 i \ln \left ({\mathrm e}^{d x +c}-i\right ) a \,b^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {\ln \left ({\mathrm e}^{d x +c}-i\right ) b^{3}}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}\) | \(443\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 216, normalized size = 1.82 \begin {gather*} \frac {b^{3} \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} - \frac {b^{3} \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} - \frac {{\left (a^{3} + 3 \, a b^{2}\right )} \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} + \frac {a e^{\left (-d x - c\right )} + 2 \, b e^{\left (-2 \, d x - 2 \, c\right )} - a e^{\left (-3 \, d x - 3 \, c\right )}}{{\left (a^{2} + b^{2} + 2 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a^{2} + b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 893 vs.
\(2 (115) = 230\).
time = 0.44, size = 893, normalized size = 7.50 \begin {gather*} \frac {{\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (a^{3} + a b^{2}\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} + {\left (2 \, a^{2} b + 2 \, b^{3} + 3 \, {\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + {\left ({\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{3} + 3 \, a b^{2}\right )} \sinh \left (d x + c\right )^{4} + a^{3} + 3 \, a b^{2} + 2 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} + 3 \, a b^{2} + 3 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right )^{2}\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - {\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right ) + {\left (b^{3} \cosh \left (d x + c\right )^{4} + 4 \, b^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{3} \sinh \left (d x + c\right )^{4} + 2 \, b^{3} \cosh \left (d x + c\right )^{2} + b^{3} + 2 \, {\left (3 \, b^{3} \cosh \left (d x + c\right )^{2} + b^{3}\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b^{3} \cosh \left (d x + c\right )^{3} + b^{3} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \log \left (\frac {2 \, {\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) - {\left (b^{3} \cosh \left (d x + c\right )^{4} + 4 \, b^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{3} \sinh \left (d x + c\right )^{4} + 2 \, b^{3} \cosh \left (d x + c\right )^{2} + b^{3} + 2 \, {\left (3 \, b^{3} \cosh \left (d x + c\right )^{2} + b^{3}\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b^{3} \cosh \left (d x + c\right )^{3} + b^{3} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) - {\left (a^{3} + a b^{2} - 3 \, {\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right )^{2} - 4 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \sinh \left (d x + c\right )^{4} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )^{2} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d\right )} \sinh \left (d x + c\right )^{2} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d + 4 \, {\left ({\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )^{3} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}^{3}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 282 vs.
\(2 (115) = 230\).
time = 0.45, size = 282, normalized size = 2.37 \begin {gather*} \frac {\frac {4 \, b^{4} \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{4} b + 2 \, a^{2} b^{3} + b^{5}} - \frac {2 \, b^{3} \log \left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (a^{3} + 3 \, a b^{2}\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {2 \, {\left (b^{3} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 2 \, a^{3} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 4 \, a^{2} b + 8 \, b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.20, size = 381, normalized size = 3.20 \begin {gather*} \frac {\frac {2\,\left (a^2\,b+b^3\right )}{d\,{\left (a^2+b^2\right )}^2}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (a^3+a\,b^2\right )}{d\,{\left (a^2+b^2\right )}^2}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}-\frac {\frac {2\,b}{d\,\left (a^2+b^2\right )}+\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2+b^2\right )}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}-\frac {\ln \left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )\,\left (2\,b+a\,1{}\mathrm {i}\right )}{2\,\left (-d\,a^2+2{}\mathrm {i}\,d\,a\,b+d\,b^2\right )}-\frac {\ln \left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )\,\left (a+b\,2{}\mathrm {i}\right )}{2\,\left (-1{}\mathrm {i}\,d\,a^2+2\,d\,a\,b+1{}\mathrm {i}\,d\,b^2\right )}+\frac {b^3\,\ln \left (2\,a^7\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-16\,b^7-9\,a^2\,b^5-6\,a^4\,b^3-a^6\,b+16\,b^7\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+a^6\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+18\,a^3\,b^4\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+12\,a^5\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+9\,a^2\,b^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+6\,a^4\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+32\,a\,b^6\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d\,a^4+2\,d\,a^2\,b^2+d\,b^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________